﻿using System;

namespace IDI.Studio.Application.Attributes
{
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Constructor, Inherited = false)]
    public sealed class DependencyInjectionAttribute : Attribute
    {
        public Type TypeToResolve { get; private set; }
        public string RegisteredName { get; set; }

        public DependencyInjectionAttribute(Type typeToResolve)
            : this(typeToResolve, null)
        {
        }

        public DependencyInjectionAttribute(Type typeToResolve, string name)
        {
            TypeToResolve = typeToResolve;
            RegisteredName = name;
        }
    }
}
